﻿<local:DocumentBase x:Class="WPFExcelReport.YCAFSPLAN"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:mx="clr-namespace:DynamicListView.Controls;assembly=MatrixLib"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                    FontSize="16"
                   Background="White"
                    Loaded="Window_Loaded"
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:QtyColorConverter  x:Key="qtyc"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetProd" />
        <db:SETINTEXDB  x:Key="SetEnv" />
        <CollectionViewSource   x:Key="vwSECTION" Source="{Binding Path=ICC_SECTION,Source={StaticResource SetEnv}}" />
        <CollectionViewSource   x:Key="vwLIEFDAT" Source="{Binding Path=LIEFDAT,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWDECK" Source="{Binding Path=WDECK,Source={StaticResource SetEnv}}" />
        <CollectionViewSource   x:Key="vwFSSTAMM" Source="{Binding Path=FSSTAMM,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwABKOPF" Source="{Binding Path=ICC_ABKOPF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwEKPOS" Source="{Binding Path=ICC_EKPOS,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwABAUFM" Source="{Binding Path=ICC_ABAUFM,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwABPOS_MAT" Source="{Binding Path=ICC_ABPOS_MAT,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwMDECKMAT" Source="{Binding Path=ICC_MDECKMAT,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwWDECKMAT" Source="{Binding Path=ICC_WDECKMAT,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwFDECKMAT" Source="{Binding Path=ICC_FDECKMAT,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwGAAUFMAT" Source="{Binding Path=ICC_GAAUFMAT,Source={StaticResource SetProd}}" />
    </local:DocumentBase.Resources>
    <Grid   >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
            <WrapPanel>
                <StackPanel>
                    <WrapPanel>
                        <TextBlock VerticalAlignment="Center" Margin="5,0,10,5" >待审核</TextBlock>
                        <Button  Width="30" Height="30"  Click="btnCheck_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Refresh.png" />
                            </Button.Background>
                        </Button>
                        
                        <TextBlock VerticalAlignment="Center"  FontSize="18"   Width="59"  Margin="0,0,0,0" Text="类型" />
                        <ComboBox
                    Name="cbWTYE"
                    HorizontalAlignment="Left"
                    IsEditable="True"
                    Background="White"
                    IsTextSearchEnabled="True"
                    IsTextSearchCaseSensitive="False"                           
                    Width="120" 
                            SelectionChanged="cbWTYE_SelectionChanged"
                    >
                            <ComboBoxItem Content="成衣"/>
                            <ComboBoxItem Content="主面料"/>
                            <ComboBoxItem Content="面辅料"/>
                            <ComboBoxItem Content="高级辅料"/>
                        </ComboBox>
                        <TextBlock VerticalAlignment="Center">波段</TextBlock>
                        <ComboBox Width="100" Name="cbSECTION"
                          DisplayMemberPath="SDDATEN"
                          SelectedValuePath="SDKEY"
                          SelectionChanged="cbSECTION_SelectionChanged"
                         ItemsSource="{Binding Source={StaticResource ResourceKey=vwSECTION}}"  
                          ></ComboBox>
                        <TextBox Name="txtSection" Width="220" FontSize="18" Background="Beige" CharacterCasing="Upper" ></TextBox>
                        <TextBlock VerticalAlignment="Center">已确认</TextBlock>
                        <CheckBox Name="ChkEKPBEKZ" IsChecked="False" VerticalAlignment="Center" 
                          Background="White"
                          >
                            <CheckBox.LayoutTransform>
                                <ScaleTransform ScaleX="2" ScaleY="2" />
                            </CheckBox.LayoutTransform>
                        </CheckBox>
                        <TextBlock VerticalAlignment="Center">辅料已入库</TextBlock>
                        <CheckBox Name="ChkEKPME3" IsChecked="False" VerticalAlignment="Center" 
                          Background="White"
                          >
                            <CheckBox.LayoutTransform>
                                <ScaleTransform ScaleX="2" ScaleY="2" />
                            </CheckBox.LayoutTransform>
                        </CheckBox>
                        <TextBlock VerticalAlignment="Center">自动推算</TextBlock>
                        <CheckBox Name="ChkAutoBackCalulate" IsChecked="False" VerticalAlignment="Center" 
                                  
                          Background="White"
                          >
                            <CheckBox.LayoutTransform>
                                <ScaleTransform ScaleX="2" ScaleY="2" />
                            </CheckBox.LayoutTransform>
                        </CheckBox>
                    </WrapPanel>
                    <WrapPanel>
         
                        <TextBlock VerticalAlignment="Center">采购单</TextBlock>
                        <TextBox Background="LightGreen"  FontSize="18"    Width="40" Name="txtEKKRS" CharacterCasing="Upper" Margin="10,0,0,0" Text="WP" />
                        <TextBox Background="White"  FontSize="18"    Width="80" Name="txtEKLFD" CharacterCasing="Upper" Margin="10,0,0,0" Text="000164" />
                        <Button  Width="30" Height="30"   Click="btnQueryEKPOS2_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Reload.png" />
                            </Button.Background>
                        </Button>
                        <TextBox Background="Yellow"  FontSize="18"    Width="160" Name="txtFSART" CharacterCasing="Upper" Margin="10,0,0,0" Text="" />
                        <Button  Width="30" Height="30"   Click="btnQueryEKPOS_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Reload.png" />
                            </Button.Background>
                        </Button>
                        <TextBox Background="White"  FontSize="18"    Width="60" Name="txtEKQTy"  Text="{Binding Path=EKPME1, Source={StaticResource ResourceKey=vwEKPOS}}"  Margin="10,0,0,0"  />
                        <TextBlock VerticalAlignment="Center">折损</TextBlock>                    
                        <Button  Width="30" Height="30"   Click="btnQtyCost_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Open.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Background="White"  FontSize="18"    Width="60" Name="txtEKNQTy" IsEnabled="False"  Margin="10,0,0,0"  />
                        <TextBlock Background="White"  FontSize="18"    Width="40" Name="txtEKMEEh"  Text="{Binding Path=EKPMEEH, Source={StaticResource ResourceKey=vwEKPOS}}"  Margin="10,0,0,0"  />
                        <TextBlock VerticalAlignment="Center">价格</TextBlock>
                        <TextBox Background="White"    Margin="10,0,0,0"  Width="60"  
                                 Text="{Binding EKPPRME, Source={ StaticResource ResourceKey=vwEKPOS}, Converter={StaticResource ResourceKey=PreisConverter}}" CharacterCasing="Upper" />
                        <TextBlock VerticalAlignment="Center">交期</TextBlock>
                        <TextBox Background="White"   Margin="10,0,0,0"  Width="120"  
                                 Text="{Binding EKPLTERM, Source={ StaticResource ResourceKey=vwEKPOS}}" CharacterCasing="Upper" 
                                     />
                        <Button FontSize="18" Height="30" Width="30" Margin="20,0,0,0" Click="btnRefreshEKP_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Upload.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Margin="0,0,0,0"  VerticalAlignment="Center" >更新采购单</TextBlock>
                    </WrapPanel>
                    <WrapPanel>
                        <Button  Height="40" Width="40" Margin="120,0,0,0" Name="btnPushQty" Click="btnPushQty_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Convert.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Margin="2,0,0,0" VerticalAlignment="Center" >自动分配</TextBlock>
                        <Button Name="btnUpdateIntex" Click="btnUpdateIntex_Click" Margin="0,0,0,0" Height="40" Width="40">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Save.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Margin="10,0,0,0" VerticalAlignment="Center" >投产</TextBlock>
                        <Button Name="btnApprove" Click="btnApprove_Click" Margin="10,0,0,0" Height="40" Width="40">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/button_ok.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Margin="10,0,0,0" VerticalAlignment="Center" >审核</TextBlock>
                        <Expander Name="zoneQty" ExpandDirection="Right"  IsExpanded="True" FontSize="18" VerticalAlignment="Center" Visibility="Hidden">
                            <WrapPanel VerticalAlignment="Center" >
                                <TextBlock VerticalAlignment="Center" >包装物抵扣</TextBlock>
                                <TextBox Name="txtPackgewg" Width="40" VerticalAlignment="Center" ></TextBox>
                                <TextBlock VerticalAlignment="Center" >KG</TextBlock>
                                <TextBlock Margin="10,0,0,0" VerticalAlignment="Center" >比例</TextBlock>
                                <TextBox Name="txtWidthRatio" Width="40" VerticalAlignment="Center" ></TextBox>
                                <TextBlock Margin="10,0,0,0" VerticalAlignment="Center" >总幅宽</TextBlock>
                                <TextBlock Name="txtWidth" Width="40"  VerticalAlignment="Center"  Text="{Binding Path=WAFBRTU, Source={StaticResource ResourceKey=vwEKPOS},Converter={StaticResource ResourceKey=d10}}"></TextBlock>
                                <TextBlock VerticalAlignment="Center" >内幅宽</TextBlock>
                                <TextBlock Name="txtNWidth" Width="40" VerticalAlignment="Center" Text="{Binding Path=WAFBRTL, Source={StaticResource ResourceKey=vwEKPOS},Converter={StaticResource ResourceKey=d10}}"></TextBlock>
                                <TextBlock VerticalAlignment="Center" >CM</TextBlock>
                                <Button  Click="btnConfirm_Click" Margin="10,0,0,0" Height="40" Width="40">
                                    <Button.Background>
                                        <ImageBrush  ImageSource="Image/button_ok.png" />
                                    </Button.Background>
                                </Button>
                            </WrapPanel>
                        </Expander>
                    </WrapPanel>                    
                </StackPanel>
            </WrapPanel>
        </StackPanel>
        <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3">
            <Grid.RowDefinitions>
                <RowDefinition Height="200" />
                <RowDefinition Height="1*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1.5*"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <WrapPanel  Grid.Row="0"  Grid.Column="0" Grid.ColumnSpan="2">
                <DataGrid
                                CanUserReorderColumns="True"  
                                CanUserResizeRows="True" 
                                CanUserSortColumns="True"                  
                                AutoGenerateColumns="False"   
                                EnableRowVirtualization="False"  
                                HorizontalAlignment="Stretch" 
                                HorizontalScrollBarVisibility="Auto"
                                VerticalScrollBarVisibility="Auto"
                                IsSynchronizedWithCurrentItem="True"
                                ItemsSource="{Binding Source={StaticResource ResourceKey=vwWDECK}}"  
                                x:Name="dlgWDECK" 
                                Margin="0,1,0,0" 
                                RowDetailsVisibilityMode="Visible"
                                >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=WDART}" Header="未审核的主面料"   Width="120" />
                    </DataGrid.Columns>
                </DataGrid  >
                <DataGrid 
                    FontSize="12"
                                CanUserReorderColumns="True"  
                                CanUserResizeRows="True" 
                                CanUserSortColumns="True"                  
                                AutoGenerateColumns="False"   
                                EnableRowVirtualization="False"  
                                HorizontalAlignment="Stretch" 
                                HorizontalScrollBarVisibility="Auto"
                                VerticalScrollBarVisibility="Auto"
                                IsSynchronizedWithCurrentItem="True"
                                ItemsSource="{Binding Source={StaticResource ResourceKey=vwEKPOS}}"  
                                x:Name="dlgEKPOS" 
                                Margin="0,1,0,0" 
                                RowDetailsVisibilityMode="Visible"
                                >
                    <DataGrid.RowDetailsTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="5">
                                <TextBlock Foreground="CadetBlue" FontSize="16"                         
                            Text="{Binding Path=EKPART, Converter={StaticResource ResourceKey=Trim}}"/>
                                <TextBlock>/</TextBlock>
                                <TextBlock Foreground="CadetBlue" FontSize="16"                             
                            Text="{Binding Path=EKPFARBE, Converter={StaticResource ResourceKey=Trim}}"/>
                                <TextBlock>:</TextBlock>
                                <TextBlock Foreground="Red" FontSize="16"                             
                            Text="{Binding Path=EKPLSART, Converter={StaticResource ResourceKey=Trim}}"/>
                                <TextBlock Foreground="Red" FontSize="16"                             
                            Text="{Binding Path=EKPLSFB, Converter={StaticResource ResourceKey=Trim}}"/>
                                
                            </StackPanel>
                        </DataTemplate>
                    </DataGrid.RowDetailsTemplate>
                    <DataGrid.Columns> 
                        <DataGridTextColumn Binding="{Binding Path=EKPBEKZ}" Header="审核"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=EKPAUFKRS}" Header=""   Width="30" />
                        <DataGridTextColumn Binding="{Binding Path=EKPAUFLFD}" Header="采购单"   Width="80" />
                        <DataGridTextColumn Binding="{Binding Path=EKPAUFPOS}" Header="行号"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=EKPART}" Header="品种"   Width="80" />
                        <DataGridTextColumn Binding="{Binding Path=EKPFARBE}" Header="颜色"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=EKPGROE}" Header="尺寸"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=EKPME1}" Header="数量"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=EKPMEEH}" Header="UM"   Width="30" />
                        <DataGridTextColumn Binding="{Binding Path=WAFBRTU, Converter={StaticResource ResourceKey=d10}}" Header="幅宽"   Width="50" />
                        <DataGridTextColumn Binding="{Binding Path=WAFBRTL, Converter={StaticResource ResourceKey=d10}}" Header="内幅宽"   Width="50" />                        
                    </DataGrid.Columns>
                </DataGrid  >
            </WrapPanel>
            <StackPanel Grid.Row="1"  Grid.Column="0" Grid.ColumnSpan="1" Name="zoneMainFabric">
                <WrapPanel>
                    <Button Width="30" Height="30"  Click="btnRemove_Click"  ToolTip="可以从此处移除需求，重新产生采购单">
                        <Button.Background>
                            <ImageBrush  ImageSource="Image/delete.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock>新总数量</TextBlock>
                    <TextBox Background="White"  FontSize="18"    Width="80"  Text="{Binding Path=PCQTY, Source={StaticResource ResourceKey=vwABPOS_MAT}}"  Margin="10,0,0,0"  />
                    <TextBlock>现总数量</TextBlock>
                    <TextBlock Background="White"  FontSize="18"    Width="80"    Text="{Binding Path=PPQTY, Source={StaticResource ResourceKey=vwABPOS_MAT}}"  Margin="10,0,0,0"  />
                </WrapPanel>
                <DataGrid 
                                CanUserReorderColumns="True"  
                                CanUserResizeRows="True" 
                                CanUserSortColumns="True"                  
                                AutoGenerateColumns="False"   
                                EnableRowVirtualization="False"  
                                Width="Auto"
                                VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True"
                                ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS_MAT}}"  
                                Margin="0,1,0,0" 
                                IsTextSearchCaseSensitive="True" 
                                RowDetailsVisibilityMode="Visible"
                                SelectionUnit="FullRow">
                    <DataGrid.RowDetailsTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="50,0,0,0" HorizontalAlignment="Right">
                                <TextBlock Foreground="Black" FontSize="12" Text="生产单"/>
                                <TextBlock Foreground="Black" FontSize="12" Text="{Binding Path=KRS}"/>
                                <TextBlock Foreground="Black" FontSize="12" Text="{Binding Path=LFD}"/>
                                <TextBlock Foreground="Black" FontSize="12" Text="意向量"/>
                                <TextBlock Foreground="Black" FontSize="12" Text="{Binding Path=TQTYP}"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0" FontSize="12" Text="S:"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0" FontSize="12" Text="{Binding Path=SP}"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0" FontSize="12" Text="M:"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="{Binding Path=MP}"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="L:"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="{Binding Path=LP}"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="XL:"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="{Binding Path=XLP}"/>
                            </StackPanel>
                        </DataTemplate>
                    </DataGrid.RowDetailsTemplate>
                    <DataGrid.Columns>

                        <DataGridTextColumn Binding="{Binding Path=PCQTY}" Header="面料"   Width="60" />
                        <DataGridTextColumn Binding="{Binding Path=PPQTY}" Header="分配"   Width="60" />
                        <DataGridTextColumn Binding="{Binding Path=UM}" Header="UM"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=ABPSPGRD}" Header="确认"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=ABPART,Converter={StaticResource ResourceKey=Trim}}" Header="款式"   Width="180" />
                        <DataGridTextColumn Binding="{Binding Path=ABPFARBE,Converter={StaticResource ResourceKey=Trim}}" Header="颜色"   Width="60" />
                        <DataGridTextColumn Binding="{Binding Path=TQTY}" Header="数量"   Width="80" >
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="Foreground" Value="{Binding Path=DQTY,Converter={StaticResource ResourceKey=qtyc}}"></Setter>
                                    <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                        </DataGridTextColumn>
                        <DataGridTextColumn Binding="{Binding Path=S}" Header="S"   Width="60" >
                        </DataGridTextColumn>
                        <DataGridTextColumn Binding="{Binding Path=M}" Header="M"  Width="60" />
                        <DataGridTextColumn Binding="{Binding Path=L}" Header="L"  Width="60" />
                        <DataGridTextColumn Binding="{Binding Path=XL}" Header="XL"  Width="60" />
                    </DataGrid.Columns>
                </DataGrid  >
                <DataGrid  Grid.Row="1"  Grid.Column="1"
                CanUserReorderColumns="True"  
                                      CanUserResizeRows="True" CanUserSortColumns="True"                  
                                      AutoGenerateColumns="False"   
                                      EnableRowVirtualization="True"  
                                      RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                      IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                                      ItemsSource="{Binding Source={StaticResource ResourceKey=vwWDECKMAT}}"       
                       Name="WDECKDataGrid"
                                      SelectionUnit="FullRow"
                                      Grid.ColumnSpan="4" Margin="0,1,0,0"
                       >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ART}" Header="面料"   Width="120" />
                        <DataGridTextColumn Binding="{Binding Path=FARBE}" Header="颜色"   Width="60" />
                        <DataGridTextColumn Binding="{Binding Path=STQTY, Converter={StaticResource ResourceKey=d100}}" Header="数量"   Width="80" />
                        <DataGridTextColumn Binding="{Binding Path=UM}" Header="UM"   Width="60" />
                    </DataGrid.Columns>
                </DataGrid  >
                <StackPanel Grid.Row="0"  Grid.Column="1">
                    <TextBlock>消息</TextBlock>
                    <TextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="txtEKP"></TextBox>
                </StackPanel>
            </StackPanel>
            <DataGrid  Grid.Row="0"
                       Grid.RowSpan="2"
                       Grid.Column="1"
                       CanUserReorderColumns="True"  
                       CanUserResizeRows="True" CanUserSortColumns="True"                  
                       AutoGenerateColumns="False"   
                       EnableRowVirtualization="True"  
                       RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" 
                       IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                       ItemsSource="{Binding Source={StaticResource ResourceKey=vwABAUFM}}"       
                       Name="dlgABAUFM"
                       SelectionUnit="FullRow"
                       VerticalAlignment="Top"
                       MaxHeight="500"
                       Grid.ColumnSpan="1" Margin="0,1,0,0"
                       >
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=ABAUFPOS}" Header="行"   Width="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABAFARBE}" Header="颜色"   Width="50" />
                    <DataGridTextColumn Binding="{Binding Path=ABARESMG}" Header="需求"   Width="60" />
                    <DataGridTextColumn Binding="{Binding Path=ABAQTYRESERVE}" Header="留位"   Width="60" />
                    <DataGridTextColumn Binding="{Binding Path=ABPART, Converter={StaticResource ResourceKey=Trim}}" Header="款号"   MinWidth="120" />

                </DataGrid.Columns>
            </DataGrid  >

        </Grid>
    </Grid>
</local:DocumentBase>
